package app.Disthanitian.thaistyle.EmerMez;

import java.util.ArrayList;

import android.preference.PreferenceManager;
import android.content.Context;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.TextView;

public class SettingView extends Activity {
	private TextView setting;
	private ListView setListview;
	private ArrayList<String> data;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.setting_msg);

		// View Matching
		// setting = (TextView) findViewById(R.id.setting);
		// setListview = (ListView) findViewById(R.id.setting_listview);
		// data - new ArrayList<String>();
		for (int i = 1; i <= 20; i++) {

		}

	}

	private class MyAdaptor extends BaseAdapter {

		@Override
		public int getCount() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public Object getItem(int position) {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public long getItemId(int position) {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public View getView(int position, View convertView, ViewGroup parent) {
			// TODO Auto-generated method stub
			return null;
		}

	}
	
	
	public static String getMessageRed(Context context){
		MemberUser u = new MemberUser();
		//return PreferenceManager.getDefaultSharedPreferences(context).getString("msgRed", ""+u.getFirstname()+" may be in risk because "+u.getFirstname()+" doesn't interact with the phone.");
		
		return PreferenceManager.getDefaultSharedPreferences(context).getString("msgRed","RedMessage");
	}
	public static String getMessageYellow(Context context){
		MemberUser u = new MemberUser();
		//return PreferenceManager.getDefaultSharedPreferences(context).getString("msgRed", ""+u.getFirstname()+" may be in risk because "+u.getFirstname()+" doesn't interact with the phone.");
		
		return PreferenceManager.getDefaultSharedPreferences(context).getString("msgYel","YelMessage");
	}
	
	public static String getPinCode(Context context){
		MemberUser u = new MemberUser();
		//return PreferenceManager.getDefaultSharedPreferences(context).getString("msgRed", ""+u.getFirstname()+" may be in risk because "+u.getFirstname()+" doesn't interact with the phone.");
		
		return PreferenceManager.getDefaultSharedPreferences(context).getString("pinCode","1234");
	}

}
